package oldFiles;
import lejos.nxt.*;

public class SoundCar 
{
	private static MotorPort mp = MotorPort.A;
	
    public static void main(String [] args)
    {   
    	mp.controlMotor(100, 1);
    	
    	RandomDrive rd;
    	AvoidFront af;
    	PlaySounds ps;
    	DriveLight dtl;
    	
        LCD.drawString("Sound Car",0,0);
        LCD.refresh();
    	
    	/*
    	rd = new RandomDrive("Drive",1, null);
    	dtl = new DriveLight("Light",2,rd);
    	af = new AvoidFront ("Avoid",3,dtl);
    	ps = new PlaySounds ("Play ",4,af);

       	rd.start();
       	af.start();
    	ps.start();
    	dtl.start();
*/
        Traveller t = new Traveller("travel", 1, null);
        PilotAvoid pa = new PilotAvoid("avoid", 2, t);
        
        t.start();
        //pa.start();
        
    	while (! Button.ESCAPE.isPressed())
    	{
    		/*
    		rd.reportState();
    		af.reportState();
    		ps.reportState();
    		dtl.reportState();
    		*/
    		t.reportState();
    		pa.reportState();
    	}
    	
    	LCD.clear();
        LCD.drawString("Program stopped",0,0);
        LCD.refresh();

    }    
}
